  /*  $(".tab_itemactive").click(function(){
            $(".tab_itemactive").css("color","red"); 
            $(".tab_item").css("color","balck"); 
       
       })
       $(".tab_item").click(function(){
            $(".tab_item").css("color","red"); 
            $(".tab_itemactive").css("color","balck"); 
       
       }) */
       
          /* var act=document.getElementById("#ta");
          console.log(act);
          var bct=document.getElementById("#tb");
          console.log(bct);
          act.onclick=function(){
        	  act.style.color="red";
        	  bct.style.color="black";
          }
          bct.onclick=function(){
        	  bct.style.color="red";
        	  act.style.color="black";
          } */
          function showps(){
         if (this.forms.password.type="password") {
         document.getElementById("box").innerHTML="<input type=\"text\" name=\"password\" size=\"80\" style='width:\"150\";' value="+this.forms.password.value+">";
         document.getElementById("click").innerHTML="<a href=\"javascript:hideps()\">◎</a>";
                    }
        }
          function hideps(){
         if (this.forms.password.type="text") {
         document.getElementById("box").innerHTML="<input type=\"password\" name=\"password\" size=\"80\" style='width:\"150\";' value="+this.forms.password.value+">";
         document.getElementById("click").innerHTML="<a href=\"javascript:showps()\">¤</a>";
         doucument.getElementById("click")
             }
         }
         function changeTab(tabCon_num){ 
                 for(i=0;i<=1;i++) { 
                document.getElementById("tabCon_"+i).style.display="none"; //将所有的层都隐藏   
                 } 
               document.getElementById("tabCon_"+tabCon_num).style.display="block";//显示当前层    
               wechatLogin()
                 }  
         function wechatLogin(){
         	$.ajax({
                 url: "../../GetQrCodeServlet?op=getUrl",
                 type: "POST",
                 success: function (data) {
                 	var data = eval("("+data+")")
                 	var qrcode = new QRCode(document.getElementById("code"), {
                 		width : 200,
                 		height : 200
                 	});
                     qrcode.makeCode(data.userId);
                     validateLogin(data.userName)
                 }
         	
         	});
         	
         	 function validateLogin(aa){
                  $.get("../../LongConnectionCheckServlet?uuid=" + aa , function(data,status) {
                      console.log("data:"+data);
                      console.log("status:"+status);
                 	 if(data == ""){
                          validateLogin(aa);
                      }else{
                          var data = eval("(" + data + ")");
                          alert("登录成功了:" +"code="+ data.code+";state="+data.state);
                      }
                  });
              }
         }  